home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Text / Inline Input for TextEdit / InlineInputSample / InlineInputSample.a < prev    next >
Encoding:
Text File  |  1993-12-08  |  1.1 KB  |  41 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        InlineInputSample.a
  3. ;
  4. ;    Contains:    68K Assembly source file for InlineInputSample
  5. ;
  6. ;    Copyright:    © 1989, 1993 Apple Computer, Inc. All rights reserved.
  7.  
  8.  
  9. ;
  10. ;    AsmClickLoopProc
  11. ;
  12. ;    This routine gets called by the TextEdit Manager from TEClick.
  13. ;    It calls the old, default click loop routine that scrolls the
  14. ;    text, and then calls our own Pascal routine that handles
  15. ;    tracking the scroll bars to follow along.  It doesn't bother
  16. ;    with saving registers A0 and D0, because they are trashed
  17. ;    anyway by TextEdit.
  18. ;
  19.  
  20. AsmClickLoopProc    PROC        EXPORT
  21.  
  22.             IMPORT        GETOLDCLICKLOOP
  23.             IMPORT        CLICKLOOPADDON
  24.             
  25.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  26.             CLR.L        -(SP)                ; make space for procedure pointer
  27.             JSR            GETOLDCLICKLOOP        ; get the old clikLoop
  28.             MOVEA.L        (SP)+,A0            ; into A0
  29.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  30.             
  31.             JSR            (A0)                ; and execute old clikLoop
  32.  
  33.             MOVEM.L        D1-D2/A1,-(SP)        ; D0 and A0 need not be saved
  34.             JSR            CLICKLOOPADDON        ; do our clikLoop
  35.             MOVEM.L        (SP)+,D1-D2/A1        ; restore the world as it was
  36.             MOVEQ        #1,D0                ; clear the zero flag so TextEdit keeps going
  37.             RTS
  38.  
  39.             END 
  40.  
  41.